package gxb.test03;

import java.util.Scanner;

public class demo02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("请输入小时数：");
        int hours = scanner.nextInt();

        System.out.print("请输入分钟数：");
        int minutes = scanner.nextInt();

        System.out.print("请输入秒数：");
        int seconds = scanner.nextInt();

        int totalSeconds = (hours * 3600) + (minutes * 60) + seconds;

        System.out.println("总共的秒数为：" + totalSeconds + "秒");

        scanner.close();
    }
}
